<%@page import="com.windfone.common.Constant"%>
<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>

<%@ taglib uri="/WEB-INF/recommend.tld" prefix="windfone"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>風馳電訊 您最貼心的手機顧問  檢索</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<%@ include file="headkey.jsp"%>
<%@ include file="head.jsp"%>
</head>

<body id="pages9">

<!--头部--> 
<%@ include file="navigate.jsp"%>
<!--内容-->
<div class="contentBox">
<!--左区-->
<div class="col1">
<div class="tabLeBox">
<div class="title">
  <h3>详细搜索</h3></div>
<div class="borderBox">
<script>
	function qryByCondition(){
		var priceSel = document.getElementById("priceSel").value;
		var typeId = document.getElementById("typeId").value;
		var productName = document.getElementById("productName").value;
		var beginPrice = "-1";
		var endPrice = "-1";
		if ( priceSel !="-1"){
			var indexFlag = priceSel.indexOf("-");
			beginPrice = priceSel.substring(0,indexFlag);
			endPrice = priceSel.substring(indexFlag+1,priceSel.length);
		} 
		if ( priceSel == "4001"){
			beginPrice = priceSel;
			endPrice = "1000000";
		}
		var	whereCondition = "&searchType=1&typeId="+typeId+"&productName="+productName + "&beginPrice="+beginPrice +"&endPrice="+endPrice;
		//alert( whereCondition);
		window.location.href= "searchformobile.action?"+whereCondition;
	}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="searchInput">
  <tr>
    <td width="40">&nbsp;品&nbsp;牌</td>
    <td>
  <s:select list="productTypeList"  listValue="typeName" listKey="id"  name="typeId"  
 			id="typeId"  headerKey="-1" headerValue="--请选择手机类型--"  value="productyTypeIdQ"></s:select>
    </td>
  </tr>
  <tr>
    <td>&nbsp;价&nbsp;格</td>
    <td>
    <select id="priceSel" name="priceSel">
      <option value="-1">请选择</option>
      <option value="0-1000">1000以下</option>
      <option value="1000-2000">1000-2000</option>
      <option value="2000-3000">2000-3000</option>
      <option value="3000-4000">3000-4000</option>
      <option value="4001">4000以上</option>
    </select></td>
  </tr>
  <tr>
    <td>&nbsp;名&nbsp;称 </td>
    <td align="left"><label for="productNameLbl"></label>
      <input type="text" name="productName" id="productName" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td align="left"><input type="submit" name="button" id="button" value="搜索" onclick="qryByCondition()" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

</div>
</div>

<div class="clear"></div>
<div class="tabLeBox">
<div class="title"><h3>新机抢先看</h3></div>

<%@include file="newsee.jsp" %>
</div>
</div>
<div class="col2">
  <div class="tabLeBoxB" style=" padding-top:0">
  <div class="title">
    <h3>搜索结果</h3></div>
<div class="borderBox">
<div>
	<ul class="imageList">
		<c:if test="${not empty products and searchType ==1 }">
			<c:forEach var="mobile" items="${products}" varStatus="status">
				<li>
					<a href="detailmobile.action?productId=${mobile.id }" target="_blank"><img src="<%=contextPath %>/${mobile.imagepath}" style="width:70px; height:90px;"/></a>
					<p>
						<a href="detailmobile.action?productId=${mobile.id }" target="_blank">${mobile.name }</a>
					</p>
					<p>
						<em style="cursor: pointer;"><c:if test="${mobile.price == 0.0 }">即將上市</c:if><c:if test="${mobile.price != 0.0 }">￥${mobile.price }</c:if></em>
					</p>
				</li>
			</c:forEach>
		</c:if>
		<c:if test="${not empty fittings and searchType ==2 }">
			<c:forEach var="fitting" items="${fittings}" varStatus="status">
				<li>
					<a href="pjDetail.action?peijianId=${fitting.id }" target="_blank"><img src="<%=contextPath %>/${fitting.imagepath }" style="width:70px; height:90px;"/></a>
					<p>
						<a href="pjDetail.action?peijianId=${fitting.id }" target="_blank">${fitting.typeName }</a>
					</p>
					<p>
						<em style="cursor: pointer;">￥${fitting.price }</em>
					</p>
				</li>
			</c:forEach>
		</c:if>
	</ul>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<%@ include file="bottom.jsp"%>
</body>
</html>
